<?php


class Test_createquery extends CI_Controller {

	public function __construct() {
		parent::__construct(); 
                // the tutorial shows this as 
                // parent::Controller();
                
                
	}

	public function index() {
            global $em;

$loginvar = 'xjermx@gmail.com';

//$q = $em->createQuery("select u from ORM\Dynasties2\Users u where u.email == $loginvar");
    //$query = $em->createQuery("SELECT u from Testing\User u where u.email == '1'");
        //$query = $em->createQuery("SELECT u from Testing\User u");
            $query = $this->doctrine->em->createQuery("SELECT u from ORM\Dynasties2\Users u where u.email = 'xjermx@gmail.com'");
            $users = $query->getResult();
            echo $users;
            
        }
}